/**
 * 
 */
package com.p2p.front.enums;

import org.apache.commons.lang.StringUtils;

/**
 * @author ruiqi
 *
 */
public enum LoanRepayMethod {

	//还款方式:m-按月分期,i-按月付息,到期还本,e-到期还本息
	//统一小写
	/**
	 * -按月分期
	 */
	m,
	/**
	 * -按月付息
	 */
	i,
	/**
	 * -到期还本息
	 */
	e,
	;
	public static LoanRepayMethod getEnumByName(String str){
		
		if(StringUtils.isBlank(str)){
			return null;
		}
		for(LoanRepayMethod loanRepayMethod:LoanRepayMethod.values()){
			if(loanRepayMethod.name().equals(str)){
				return loanRepayMethod;
			}
		}
		return null;
	}
}
